package ecustom.common.servicelog.service;

import ecustom.common.CustomMap;
import ecustom.common.mode.service.ModeService;
import ecustom.common.util.CustomUtil;
import ecustom.common.util.PropUtil;

public class ServiceLogService {
	
	private ModeService modeService = new ModeService();
	
	public Integer save(CustomMap fields) throws Exception {
		return modeService.createBillAndShare(1, getModeId(), "UF_ESERVICELOG", fields);
	}

	public int getModeId() {
		String value = PropUtil.getString("ecustom", "servicelog.mode.id");
		return CustomUtil.getIntCK(value, "ecustom.properties->servicelog.mode.id value is not a integer!");
	}
}
